API Documentation
ImageBase.h
1 // ImageBase.h
3 //
5 
6 namespace nkImages
7 {
18  class ImageBase
19  {
20  public :
21 
25  ImageBase () ;
33  ImageBase (unsigned int width, unsigned int height, PIXEL_FORMAT format) ;
44  ImageBase (unsigned int width, unsigned int height, unsigned int depth, PIXEL_FORMAT format, unsigned int pixelByteSize, unsigned int rowByteSize) ;
50  ImageBase (const ImageBase& other) ;
56  ImageBase (ImageBase&& other) ;
60  virtual ~ImageBase () ;
61 
62  // Getters
66  unsigned int getWidth () const ;
70  unsigned int getHeight () const ;
74  unsigned int getDepth () const ;
82  unsigned int getPixelByteSize () const ;
86  unsigned int getRowByteSize () const ;
90  unsigned int getSliceByteSize () const ;
91 
92  // Setters
98  void setWidth (unsigned int value) ;
104  void setHeight (unsigned int value) ;
110  void setDepth (unsigned int value) ;
116  void setFormat (PIXEL_FORMAT value) ;
122  void setPixelByteSize (unsigned int value) ;
128  void setRowByteSize (unsigned int value) ;
134  void setSliceByteSize (unsigned int value) ;
135 
136  // Utils
146  nkMaths::Vector getPixel (unsigned int x, unsigned int y, unsigned int z = 1) ;
147 
148  // Data accessors
154  virtual unsigned char* getDataPtr () const = 0 ;
155 
156  // Operators
162  ImageBase& operator= (const ImageBase& other) ;
169  } ;
170 }
nkImages::ImageBase::ImageBase
ImageBase(unsigned int width, unsigned int height, PIXEL_FORMAT format)
nkImages::ImageBase::ImageBase
ImageBase(unsigned int width, unsigned int height, unsigned int depth, PIXEL_FORMAT format, unsigned int pixelByteSize, unsigned int rowByteSize)
nkImages::ImageBase::ImageBase
ImageBase(ImageBase &&other)
nkImages::ImageBase::setDepth
void setDepth(unsigned int value)
nkImages::ImageBase::getHeight
unsigned int getHeight() const
nkImages::ImageBase::getRowByteSize
unsigned int getRowByteSize() const
nkImages::ImageBase::operator=
ImageBase & operator=(const ImageBase &other)
nkImages::ImageBase::setRowByteSize
void setRowByteSize(unsigned int value)
nkImages::ImageBase::getDataPtr
virtual unsigned char * getDataPtr() const =0
nkImages::ImageBase::ImageBase
ImageBase()
nkImages::ImageBase::setPixelByteSize
void setPixelByteSize(unsigned int value)
nkImages::ImageBase::getPixelByteSize
unsigned int getPixelByteSize() const
nkImages::ImageBase
Base for all image data classes.
Definition: ImageBase.h:19
nkImages::ImageBase::setFormat
void setFormat(PIXEL_FORMAT value)
nkImages::ImageBase::getDepth
unsigned int getDepth() const
nkImages
Encompasses all API of component NilkinsImages.
Definition: BmpEncoder.h:7
nkImages::ImageBase::ImageBase
ImageBase(const ImageBase &other)
nkImages::ImageBase::getWidth
unsigned int getWidth() const
nkImages::PIXEL_FORMAT
PIXEL_FORMAT
Lists formats for pixels.
Definition: PixelFormat.h:16
nkImages::ImageBase::getSliceByteSize
unsigned int getSliceByteSize() const
nkImages::ImageBase::getFormat
PIXEL_FORMAT getFormat() const
nkImages::ImageBase::getPixel
nkMaths::Vector getPixel(unsigned int x, unsigned int y, unsigned int z=1)
nkImages::ImageBase::setHeight
void setHeight(unsigned int value)
nkImages::ImageBase::setWidth
void setWidth(unsigned int value)
nkMaths::Vector
A 4-component vector class, with floats.
Definition: Vector.h:12
nkImages::ImageBase::~ImageBase
virtual ~ImageBase()
nkImages::ImageBase::setSliceByteSize
void setSliceByteSize(unsigned int value)